<%-- 
    Document   : editcriteriaWork
    Created on : Jul 18, 2012, 3:53:33 PM
    Author     : VANANH
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>
<html>
    <head>
        <link rel="stylesheet" type="text/css" href="../css/popup.css"/>
        <link rel="stylesheet" type="text/css" href="../css/kapiform.css"/>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/jq.date.js"></script>  
        <link rel="stylesheet" type="text/css" href="../css/ui.datepicker.css"/>
    </head>
    <script type="text/javascript">
        var open_cur = 0;
        $j = jQuery.noConflict();
        $j(document).ready(function(){

           
            validateform("form-input-customer");
        });

    </script>
    <script type="text/javascript">
        var open_cur = 0;
        $j = jQuery.noConflict();
        $j(document).ready(function(){             
            $j('input#dateN550').datepicker({ dateFormat: 'dd/mm/yy', showOn: 'button', buttonImage: '../images/calenda_icon.gif', buttonImageOnly: true }); 
            $j(".checktrue").live("click",function(){
              
                if($j(this).is(':checked')){
                    $j(this).parent().next().next().css("display","block");
                }else{
                    $j(this).parent().next().next().css("display","none");
                }

                var lang= $j(this).attr("lang");
                var boool;
                // alert(lang)               
                if( $j(this).is(":checked"))
                {
                    boool = true;
                }
                else
                {
                    boool = false;
                }
                            
                $j.post("C525.jsp?action=addCusp100&p100="+lang+"&valueC="+boool,function(data){
                            
                });

            }); 
                
            $j(".chooseFn100").live("change",function(){
                var v = $j(this).val();
                var v1 = $j(this).parent().attr("lang");
                $j.post("C525.jsp?action=addlistC425&p100="+v+"&pc425="+v1,function(data){
                            
                });
            });
        });
    </script>
    <style type="text/css">
        #ui-datepicker-div
        {
            z-index: 9999999;
        }
        .form_item_content{
            float: left;
            margin-left: 10px;
            margin-top: 9px !important;
            width: 100%;
        }

    </style>
    <f:view>
        <h:form id="form-input-customer" >
            <body style=" float:left; width:auto; height:auto; margin:0px;">
                <f:loadBundle basename="#{environmentSession.localizationSource}" var="locale"/>

                <div class="popup" style="height:auto; width:450px">
                    <div class="popup-header">
                        <div class="title"><h:outputText value="Quy trình áp dụng"/></div>
                    </div>
                    <div class="popup-content">
                        <div class="main_content">
                            <div class="form_item_content" style="margin-top: 0px !important;margin-left: 0px !important;;" >

                                <div class="item_content" style="display:block">
                                    <div class="fields_input" style="background-color:#A4BDD3 ;width: 100%;margin-top: 0 !important;height: 40px;padding: 12px 0 0;" >
                                        <label style="text-align:left;width:152px; margin-left:21px"><h:outputText value="Quy trình"/><span>*</span></label> 

                                        <h:selectOneMenu style="width:55%;" value="#{c525Controller.FC475}">
                                            <f:selectItems value="#{c525Controller.cbbC475}"/>
                                        </h:selectOneMenu>

                                    </div>
                    <%--                <div class="fields_input" style="background-color:#A4BDD3 ;width: 100%;margin-top: 0 !important;height: 40px;padding: 12px 0 0;" >
                                        <label style="text-align:left;width:152px; margin-left:21px"><h:outputText value="Công việc"/></label> 
                                        <a4j:region>
                                            <h:selectOneMenu style="width:55%;" value="#{c525Controller.FC425}">
                                                <f:selectItems value="#{c525Controller.cbbC425}"/>
                                                <a4j:support event="onchange"  actionListener="#{c525Controller.actionSearch}" reRender="list" onsubmit="showPleaseWait();" oncomplete="hidePleaseWait();"/>
                                            </h:selectOneMenu>
                                        </a4j:region>
                                    </div> --%>
                                    <div class="fields_input" style="overflow: auto;height: 150px;width: 99%;margin-top: 0 !important;background-color: #E5EAF0;padding: 7px 0 7px 5px;" >
                                        <h:panelGroup id="list">
                                        <a4j:repeat value="#{c525Controller.ccurpks_listoftabc425}" var="item">
                                            <div style="float: left;margin-top: 3px;margin-left: 20px;width: 90%;padding: 0 0 5px;height: 20px;">
                                                <div style="float: left;margin-right: 5px;">
                                                    <h:selectBooleanCheckbox lang="#{item.pc425}" styleClass="checktrue" value="">

                                                    </h:selectBooleanCheckbox>
                                                </div>
                                                <div style="float: left;width: 200px;">
                                                    <h:outputText value="#{item.cv427}"/>
                                                </div>

                                                <div style="float: right;display: none;" lang="<h:outputText value="#{item.pc425}"/>">
                                                    <h:selectOneMenu styleClass="chooseFn100"  value="#{c525Controller.FN100}">
                                                        <f:selectItems value="#{T950Bean.listCombN100}"/>
                                                    </h:selectOneMenu>
                                                </div>

                                            </div>
                                        </a4j:repeat>
                                        </h:panelGroup>

                                    </div>
                                    <div class="fields_input" style="height: 114px;background-color: #F5F6F8;width: 100%;margin-top: 0 !important;">
                                        <label style="text-align:left; margin-left:21px"><h:outputText value="#{locale.description}"/> </label>
                                        <h:inputTextarea value="#{c525Controller.CV527}"  style="height:70px; width: 89.5%; margin-left:25px"  ></h:inputTextarea>

                                    </div>
                                </div>
                            </div>

                        </div>

                    </div>

                    <div class="popup-footer">

                        <div class="buttonsave" style="margin-right: 33px;"  onclick="parent.jQuery.fancybox.close(); "  ><span><h:outputText value="#{locale.close}"/></span></div>
                        <h:commandButton   onclick="return validatecheck('form-input-customer');"  action="#{c525Controller.stdc_tools_inserttabc525}" value="#{locale.save}" styleClass="buttonsave">

                        </h:commandButton>

                        <h:inputHidden value="#{c525Controller.PC525}" id="PC525"/>

                    </div>

                </div>
            </body>
        </h:form>
    </f:view>
</html>
<script type="text/javascript">
    $j(document).ready(function(){
        yhight = ($j('.popup').height()-90)+"px" ;
        $j('.main_content').css('height',yhight );
        $j('.popup-content').css('height',yhight );
    });
</script>